-- GENERATED SPELL FOR [Eldreth] --


function spell0_31195(pUnit, Event) --@Arcane Shot,n/a--
pUnit:FullCastSpellOnTarget(34829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31195', 0, 1)
end

function spell1_31195(pUnit, Event) --@Magic Dampening Field,n/a--
pUnit:FullCastSpellOnTarget(44475,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31195', 31000, 1)
end

function spell2_31195(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31195', 583, 1)
end

function Sorts_31195(pUnit, Event)
local choix_sorts_31195 = math.random(0, 2)
if choix_sorts_31195 == 0 then
pUnit:RegisterEvent('spell0_31195', 1, 1)
end
if choix_sorts_31195 == 1 then
pUnit:RegisterEvent('spell1_31195', 1, 1)
end
if choix_sorts_31195 == 2 then
pUnit:RegisterEvent('spell2_31195', 1, 1)
end
end

function mob31195_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31195', math.random(1500, 3000), 1)
end

function mob31195_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31195_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31195_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31195, 1, 'mob31195_Action')
RegisterUnitEvent(31195, 2, 'mob31195_Leave')
RegisterUnitEvent(31195, 3, 'mob31195_Kill')
RegisterUnitEvent(31195, 4, 'mob31195_Die')
